package com.dreamwhale.machinery.adviceException;


import lombok.Data;

import java.text.DateFormat;
import java.util.Date;

/**
 * @ClassName: ResultException
 * @Description: 返回给前段的异常数据类
 * @Author: Dragon
 * @Date: 2019/9/17 15:37
 */
@Data
public class ResultException {
    private Boolean status;
    private Integer code;
    private String message;
    private String time;

    public ResultException(DragonException pe) {
        this.status = false;
        this.code = pe.getCode();
        this.message = pe.getMessage();
        this.time = DateFormat.getDateTimeInstance().format(new Date());
    }
}
